
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="微信">
<!-- Mobile Devices Support @begin -->
<meta content="application/xhtml+xml;charset=UTF-8"
  http-equiv="Content-Type">
<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
<meta content="no-cache" http-equiv="pragma">
<meta content="0" http-equiv="expires">
<meta content="telephone=no, address=no" name="format-detection">
<meta name="viewport"
  content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style"
  content="black-translucent" />
<!-- Mobile Devices Support @end -->
<title><{$cfg_homepage_title}></title>

<style>
html,body{margin:0;user-select:none;-webkit-user-select:non}
html {width: 100%;height: 100%; }
body { position: absolute; width: 100%;height: 100%; margin: 0 auto;min-height: 480px }
body h1,body h2,body h3,body h4,body h5,body h6,body strong,body em {font-weight:normal; } /*å¾®è½¯é›…ä½“ å°†åŽŸæœ‰çš„boldå±žæ€§åŽ»æŽ‰*/
textarea:focus,input:focus { border: 1px solid #71b643; }
div{display: block;}
  .form-group{
    margin-top:15px;
  }


.int{
  margin-left: -15px;
  line-height:60px; 
    margin: 0 0 20px 0;
}
form{
    margin-top: 40px;
}
</style>
<!-- bootstrap-->
<link rel="stylesheet" href="__PUBLIC__/Css/bootstrap.min.css">
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/bootstrap.min.js"></script>
<!--bootstrap-->
<script type="text/javascript">
 (function() { 
  var ua = window.navigator.userAgent.toLowerCase(); 
if(!(ua.match(/MicroMessenger/i) == 'micromessenger')){ 
   window.location.href="__APP__/Index/wap_err.html";
  }
})(); 


  function savedate(){
    var name =$('#name').val();
    var phone =$('#phone').val();
    var reg_tel=new RegExp("^1[3,5,4,7,8]{1}[0-9]{9}$");
    var score =$('#score').val();
    //alert(score);return;
    if(name==''){
      alert('姓名不为空！');
      return;
    }

    if(phone==''){
      alert('请输入电话号码！');
      return;
    } else if(!reg_tel.test(phone)){
      alert("请输入正确的电话号码！");
      return;       
    }

    
   $.ajax({
            cache: true,
            type: "post",
            url:'__APP__/Index/doInput',
            dataType:'json',
            data:{name:name,phone:phone,score:score},
            async:false,
            error: function(data,msg) {
                alert('发送失败，刷新重试');                
            },
            success: function(data) {
                alert(data);
                self.location.href='__APP__/Index/showList';
            }
        });
    
    

  }

</script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/style_input.css">

</head>
<body>
<input id='score' type='hidden' value='<{$_GET['score']}>'>
<div class="stage">
    <div class="topbox">
          <form action="input.html?action=addscroe" method="post">
            <div class="form-group">
              <label for="name" class="col-sm-3 col-xs-4  control-label" >姓名</label>
              <div class="col-xs-8 int" style="margin-left: -20px;">
                <input type="text" name="name"  id="name" class="form-control" placeholder="请输入姓名" />
              </div>
              
            </div>
            <div class="form-group">
              <label for="phone" class="col-sm-3 col-xs-4 control-label">电话</label>
              <div class="col-xs-8 int" style="margin-left: -20px;">
                
               <input type="text" name="phone" id="phone" class="form-control"  placeholder="请输入号码"/>
              </div>
            </div>
            
                <div class="form-group row" class="row">
                  <div class="col-xs-4 col-xs-offset-2 col-md-4 col-md-offset-3">
                       <button id="save-btn" type="button" class="btn btn-default" onclick="savedate()">提交</button>
                  </div>
                  <div class="col-xs-4 col-xs-setoff-2 col-md-4 col-md-offset-1">
                       <input type="reset" name="reset" value="清空" class="btn btn-default" />
                  </div>
                  
                  
               </div>
            
          </form>
    </div>
</div>
</body>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>

wx.config({
    debug: false,
    appId: '<{$signPackage["appId"]}>',
    timestamp: '<{$signPackage["timestamp"]}>',
    nonceStr: '<{$signPackage["nonceStr"]}>',
    signature: '<{$signPackage["signature"]}>',
      jsApiList: [
        'onMenuShareTimeline',
        'onMenuShareAppMessage',
        'hideMenuItems'//隐藏分享按钮
  ]
  });
  
wx.ready(function () {
// 在这里调用 API
 
 shareFn();
 
 
  });
  
  wx.error(function (res) {
 
 alert(res.errMsg);
  });
  
  function shareFn() {
  //隐藏分享按钮函数
    wx.hideMenuItems({
       menuList: [
         'menuItem:copyUrl',
         'menuItem:openWithQQBrowser',
         'menuItem:share:email',
         'menuItem:openWithSafari' 
       ],
       success: function (res) {
       },
       fail: function (res) {
       }
     });
  wx.onMenuShareAppMessage({
        title: '<{$cfg_wx_share_title}>',
        desc: '<{$cfg_wx_share_desc}>',
        link: '<{$cfg_wx_share_url}>',
        imgUrl: '<{$cfg_wx_share_pic}>',
        trigger: function (res) {
          //alert('用户点击发送给朋友');
        },
        success: function (res) {
          //alert('已分享成功');
          
        },
        cancel: function (res) {
          //alert('已取消');
        },
        fail: function (res) {
         // alert(JSON.stringify(res));
        }
      });
   
   wx.onMenuShareTimeline({
        title:'<{$cfg_wx_share_desc}>',
        link: '<{$cfg_wx_share_url}>',
        imgUrl: '<{$cfg_wx_share_pic}>',
     
        trigger: function (res) {
          // alert('用户点击分享到朋友圈');
        },
        success: function (res) {
            //alert('已分享成功');
           
        },
        cancel: function (res) {
          //alert('已取消分享');
        },
        fail: function (res) {
          //alert(JSON.stringify(res));
        }
      });
  
 }


</script>
</htmL>